<?php
/*
 * Created on Oct 14, 2008
 *
 * Setup the character.
 */
session_start();

if ( !isset($_SESSION['user']) ) {
	$referer = urlencode( "../animesetup.php" );
	header( "Location: security/login.php?referer=" . $referer );
	exit;
}
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
    	<title>Character Setup</title>
    	<script src="js/admin.js" type="text/javascript"></script>
    </head>
    <body style="font-family: arial, helvetica, sans-serif">
    <div style="width: 350px; margin-left: auto; margin-right: auto; border: medium solid #800; padding: 25px">
    	<h2>Title Setup</h2>
    	<p>
        <form action="titleadd.php" method="post">
			Title: <input type="text" name="name"> <input type="submit" value="Add Title">
        </form>
        </p>    	
   		<h2>Character Setup</h2>
 		<p>
        <form name="adminf" enctype="multipart/form-data" action="characteradd.php" method="post">
            <input type="hidden" name="MAX_FILE_SIZE" value="10000000">            
			Name: <input type="text" name="character" onchange="setAltText()"><br>
            Series: <select name="title">
            <option value="">Select a series</option>
<?php
require_once ("../server/dbconnect.php");
require_once ("../server/anime/showtitles.php");
showTitles();
?>
			</select><br>			
            Description:<br>
            <textarea name="description" cols="40" rows="10"></textarea><br>
            Image: <input name="userfile" type="file"><br>
            Alt Text: <input type="text" name="text"><br>
            <input type="submit" value="Add Character">
        </form>
        </p>
        <p><a href="security/logout.php">Logout</a></p>
    </div>
    </body>
</html>
